package com.singzi.leetcode.N2000;

public class T1995 {
    public static void main(String[] args) {

    }
}
class Solution1995 {
    private int count = 0;
    public int countQuadruplets(int[] nums) {
        int length = nums.length;
        for (int i = 0; i < length; i++) {
            for (int j = i+1; j < length; j++) {
                for (int k = j+1; k < length; k++) {
                    for (int l = k+1; l < length; l++) {
                        if(nums[i] + nums[j] +nums[k] == nums[l])
                            count++;

                    }
                }
            }
        }




        return count;
    }

}